<?php

/**
 * Compras form.
 *
 * @package    tercermilenio
 * @subpackage form
 * @author     Your name here
 */
class AgregarProductosPedidosForm extends sfForm {

    public function configure() {

    }

    public function setup() {
        parent::setup();
        
        $this->setWidgets(array(
            'pro_ped_descripcion' => new sfWidgetFormInput(array('label' => 'Descripcion')),
            'pro_ped_talle' => new sfWidgetFormInput(array('label' => 'Talle')),
            'pro_ped_cantidad' => new sfWidgetFormInput(array('label' => 'Cantidad')),
        ));

        $this->setValidators(array(
            'pro_ped_descripcion' => new sfValidatorString(array('max_length'=>250,'required'=>true)),
            'pro_ped_talle' => new sfValidatorString(array('max_length'=>3,'required'=>true)),
            'pro_ped_cantidad' => new sfValidatorInteger(array('required'=>true)),
        ));

        $this->widgetSchema->setNameFormat('agregar_productos_pedidos[%s]');
        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
    }

}
